<script type="text/javascript">
    jQuery(document).ready(function() {

        var sheepItForm = jQuery('#sheepItForm').sheepIt({
            separator: '',
            allowRemoveLast: true,
            allowRemoveCurrent: true,
            allowRemoveAll: true,
            allowAdd: true,
            allowAddN: true,
            maxFormsCount: 20,
            minFormsCount: 0,
            iniFormsCount: 1
        });
    });
</script>
<script type="text/javascript">
           jQuery(document).ready(function(){
               // binds form submission and fields to the validation engine
               jQuery("#HojasrutaNuevotrabajoForm").validationEngine();
               jQuery("#fecha_inc" ).datepicker();
           });
 </script>
<div class="widget grid12">
    <div class="whead"><h6>NOTA DE ENTREGA </h6><div class="clear"></div></div>
    <?php echo $this->Form->create('Notaventa', array('id' => "validate")); ?>
        <div class="formRow">
    <div class="formRow">
        <div class="grid3"><label>Cliente:<span class="req">*</span></label></div>
        <div class="grid3">
            <?php echo $this->Form->text('comprador', array('class'=>'validate[required] input-text', 'size'=>'40', 'id'=>'validate')); ?>
        </div>

        <div class="grid3"><label>Fecha:<span class="req">*</span></label></div>
        <div class="grid3">
            <?php echo $this->Form->text('fecha',array('id'=>'fecha_inc')); ?>
        </div>
        
        <div class="clear"></div>
    </div>
    <div class="formRow">
    <div class="grid3"><label>Nro de entrrega:<span class="req">*</span></label></div>
        <div class="grid3">
            <?php echo $this->Form->text('numero', array('class'=>'validate[required] input-text', 'size'=>'40', 'id'=>'validate')); ?>
        </div>
    </div>
               
        </div>
     <!-- sheepIt Form -->
<div id="sheepItForm">
 
  <!-- Form template-->
  <div id="sheepItForm_template">
    
    <div class="formRow">
                    <h3>PRODUCTO # <span id="sheepItForm_label"></span> </h2>
                </div>
    <div class="formRow">
                    <div class="grid3"><label>Tipo:<span class="req">*</span></label></div>
                    <div class="grid3">                
                        <?php echo $this->Form->select('tipo',$tipo, array('class'=>'validate[required] input-text', 'size'=>'0', 'id'=>'validate'));?>
                    </div>  

                    <div class="grid3"><label>Cantidad:<span class="req">*</span></label></div>
                    <div class="grid3">
                        <?php echo $this->Form->text('cantidad', array('class'=>'validate[required] input-text', 'size'=>'40', 'id'=>'validate'));?>
                    </div> 

                    <div class="clear"></div>
                </div>
    <div class="formRow">
                    <div class="grid3"><label>Detalle:<span class="req">*</span></label></div>
                    <div class="grid3">                
                        <?php echo $this->Form->select('detalle',$tipo1, array('class'=>'validate[required] input-text', 'size'=>'0', 'id'=>'validate'));?>
                    </div>  

                    <div class="grid3"><label>Tipo:<span class="req">*</span></label></div>
                    <div class="grid3">
                        <?php echo $this->Form->select('tipo1',$tipo2, array('class'=>'validate[required] input-text', 'size'=>'0', 'id'=>'validate'));?>
                    </div> 

                    <div class="clear"></div>
                </div>
    <div class="formRow">
                    <div class="grid3"><label>Tama&ntilde;o:<span class="req">*</span></label></div>
                    <div class="grid3">                
                        <?php echo $this->Form->text('tamano',array('class'=>'validate[required] input-text', 'size'=>'40', 'id'=>'validate'));?>
                    </div>  

                    <div class="grid3"><label>Peso:<span class="req">*</span></label></div>
                    <div class="grid3">
                        <?php echo $this->Form->text('peso', array('class'=>'validate[required] input-text', 'size'=>'40', 'id'=>'validate'));?>
                    </div> 

                    <div class="clear"></div>
                </div>
    <div class="formRow">
                    <div class="grid3"><label>Precio:<span class="req">*</span></label></div>
                    <div class="grid3">                
                        <?php echo $this->Form->text('precio', array('class'=>'validate[required] input-text', 'size'=>'40', 'id'=>'validate'));?>
                    </div>  

                    <div class="clear"></div>
                </div>
    
  </div>
  <!-- /Form template-->
   
  <!-- No forms template -->
  <div id="sheepItForm_noforms_template">-------------------------------------------------</div>
  <!-- /No forms template-->
   
  <!-- Controls -->
  <div id="sheepItForm_controls">
    <div id="sheepItForm_add" class="btn form add"><a href="#" class="buttonS bGreen "><span>A&ntilde;adir:</span></a></div>
    <div id="sheepItForm_remove_last" class="btn form remove"><a href="#" class="buttonS bRed "><span>Remover:</span></a></div>
    <div id="sheepItForm_remove_all" class="btn form removeAll"><a href="#" class="buttonS bGold "><span>Remover todo</span></a></div>
    
  </div>
  <!-- /Controls -->
   
</div>
<!-- /sheepIt Form -->  
</div>

<div class="actions-right">
<?php $options = array('label' => 'ACEPTAR','class' => 'buttonS bGreen','id' => 'btEnvia');echo $this->Form->end($options);?> 
        <p></p>
        <?php echo $this->Html->link("Volver &raquo;", array('controller'=>'Ventas', 'action'=>'index'), array('class'=>'buttonS bLightBlue', 'escape' => FALSE)); ?>
</div>